ActiveAdmin.register TimetableStatistic do
  config.batch_actions = false
  actions :index

  filter :company
  filter :store
  filter :course
  filter :member_price
  filter :class_start_time, as: :date_range
  csv do
    column :timetable_id
    column :company
    column :store
    column :course
    column :coach
    column :class_start_time
    column :price
    column :member_price
    column '名额' do |t|
      t.place + t.appointed
    end
    column :appointed
    column :channel_appointed
    column :signed
  end

  index do
    column :timetable_id
    column :company
    column :store
    column :course
    column :coach
    column :class_start_time
    column :price
    column :member_price
    column '名额' do |t|
      t.place + t.appointed
    end
    column :appointed
    column :channel_appointed
    column :signed
  end
end
